package com.hilihili.mapper;

import java.util.List;
import com.hilihili.domain.entity.UserLike;
import org.apache.ibatis.annotations.Param;

/**
 * 用户点赞Mapper接口
 *
 * @author xhc
 * @date 2023-11-17
 */
public interface UserLikeMapper
{

    public List<UserLike> selectUserLikeListByUserId(@Param("userId") Long userId,@Param("alike") Long alike);

//    public int insertUserLikeByUserId(UserLike userLike);

//    public int deleteUserLikeByAlike(Long userId);

    public int deleteUserLikeByUserIdAndAlike(UserLike userLike);
//    -----------------------------------------
    /**
     * 查询用户点赞
     *
     * @param id 用户点赞主键
     * @return 用户点赞
     */
    public UserLike selectUserLikeById(Long id);

    /**
     * 查询用户点赞列表
     *
     * @param userLike 用户点赞
     * @return 用户点赞集合
     */
    public List<UserLike> selectUserLikeList(UserLike userLike);

    /**
     * 新增用户点赞
     *
     * @param userLike 用户点赞
     * @return 结果
     */
    public int insertUserLike(UserLike userLike);

    /**
     * 修改用户点赞
     *
     * @param userLike 用户点赞
     * @return 结果
     */
    public int updateUserLike(UserLike userLike);

    /**
     * 删除用户点赞
     *
     * @param id 用户点赞主键
     * @return 结果
     */
    public int deleteUserLikeById(Long id);

    /**
     * 批量删除用户点赞
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteUserLikeByIds(Long[] ids);
}
